package com.pineapple.module.core.standards.fertilizer.service;

import java.sql.Connection;
import java.util.List;

import com.pineapple.module.core.standards.fertilizer.domain.Fertilizer;
import com.pineapple.module.core.standards.fertilizer.domain.FertilizerCriteria;
import com.pineapple.module.core.standards.fertilizer.domain.FertilizerSearch;

public class FertilizerManager {
	FertilizerDAO dao = null;

	public FertilizerManager(){
		dao = new FertilizerDAO();
	}

	public List<FertilizerSearch> search(FertilizerCriteria criteria,Connection conn)throws Exception{
		return dao.search(criteria, conn);
	}

	public void add(Connection conn,Fertilizer fertilizer)throws Exception{
		dao.add(conn, fertilizer);
	}
	public void edit(Connection conn,Fertilizer fertilizer)throws Exception{
		dao.edit(conn,fertilizer);
	}
	public void delete(Connection conn,String fertilizerIds)throws Exception{
		dao.delete(conn, fertilizerIds);
	}
	public Fertilizer searchById(Connection conn,int id)throws Exception{
		return dao.searchById(conn, id);
	}

}
